BASE_SRCS := precision.f90 \
	constants.f90 \
	parameters.F90 \
	object.F90 \
	universe.F90 \
	sici.f90 \
	misc.F90 \
	interp.f90 \
	integration.F90 \
	linearPower.F90 \
	fit.F90 \
	root.f90 \
	chi.F90 \
	PSfits.F90 \
	nu.F90 \
	haloModel.F90 \
	derivative.F90 \
	vector.f90 \
	diffEq.f90 \
	wigner.F90 \
	qsort.F90 \
	blas.f90 \
	matrix.f90 \
	commandLine.F90

obj_dir := objs
BASE_OBJS := $(BASE_SRCS:%.f90=$(obj_dir)/%.o)
BASE_OBJS := $(BASE_OBJS:%.F90=$(obj_dir)/%.o)
BASE_OBJS := $(BASE_OBJS:%.f=$(obj_dir)/%.o)

#base_dir = /home/dolney/rsync/src/base
base_dir = ../base
SRCS += $(BASE_SRCS:%=$(base_dir)/%)
OBJS += $(BASE_OBJS)

LIBS += $(LAPACK)

FOUR := FFT.o

.PHONY: distclean-base
distclean-base:
	rm -f *~

objs/fit.o: ../base/fit.F90
	$(F90C) $(F90FLAGS) $(DEF) $(LAPACK_INCLUDE) -c -o $@ $<

objs/matrix.o: ../base/matrix.f90
	$(F90C) $(F90FLAGS) $(DEF) $(LAPACK_INCLUDE) -c -o $@ $<
